<main role="main">
    <script src="../../../javascripts/angular.min.js"></script>
    <% for(var i=0;i<Math.min(AnswerRollSingleElection.length,100);i++){
        var item=AnswerRollSingleElection[i];
        item.id=i+1;%>
    <%}%>
    <% for(var i=0;i<Math.min(AnswerRollMultiSelection.length,100);i++){
        var item=AnswerRollMultiSelection[i];
        item.id=i+1;%>
    <%}%>
    <% include ./../parts/StartTheExam.ejs %>
    <div class="Show-Exam">
    <div class="Exams">
    <div id="DanXuanTi" class="card border-light mb-3 t-hide"  >
        <div class="card-header">单选题</div>
        <div class="card-body">
            <% include ./../parts/DanXuanTi.ejs %>
            <div class="btn-group">
                <button onclick="A.Click(-1)" type="button" class="btn btn-primary">上一题</button>
                <button onclick="A.Click(1)" type="button" class="btn btn-danger">下一题</button>
                <button onclick="A.Ok()" type="button" class="btn btn-success">交卷</button>
            </div>
        </div>
    </div>
    <div id="DuoXuanTi" class="card border-light mb-3 t-hide"  >
        <div class="card-header">多选题</div>
        <div class="card-body">
            <% include ./../parts/DuoXuanTi.ejs%>
            <div class="btn-group">
                <button onclick="B.Click(-1)" type="button" class="btn btn-primary">上一题</button>
                <button onclick="B.Click(1)" type="button" class="btn btn-danger">下一题</button>
                <button onclick="B.Ok()" type="button" class="btn btn-success">交卷</button>
            </div>
        </div>
    </div>
    <% for(var i=0;i<Math.min(AnswerRollJudge.length,100);i++){
        var item=AnswerRollJudge[i];
        item.id=i+1;%>   <%}%>
    <div id="PanDuanTi" class="card border-light mb-3 t-hide"  >
        <div class="card-header">判断题</div>
        <div class="card-body">
            <% include ./../parts/PanDuanTi.ejs %>
            <div class="btn-group">
                <button onclick="C.Click(-1)" type="button" class="btn btn-primary">上一题</button>
                <button onclick="C.Click(1)" type="button" class="btn btn-danger">下一题</button>
                <button onclick="C.Ok()" type="button" class="btn btn-success">交卷</button>
            </div>
        </div>
    </div>
    </div>
    <% include ./../parts/ExamIndexList.ejs %>

    </div>
    <script>
        var B={},C={},A={};
        window.TestId=<%-TestId%>;
        var O= new ExamIndexList( JSON.parse('<%- JSON.stringify(AnswerRollSingleElection) %>'),JSON.parse('<%- JSON.stringify(AnswerRollMultiSelection) %>'),JSON.parse('<%- JSON.stringify(AnswerRollJudge) %>'));

        var A=new AnswerRoll('DanXuanTi',JSON.parse('<%- JSON.stringify(AnswerRollSingleElection) %>'),O,'px');

        B=new AnswerRoll('DuoXuanTi',JSON.parse('<%- JSON.stringify(AnswerRollMultiSelection)%>'),O,'py');

        C=new AnswerRoll('PanDuanTi',JSON.parse('<%- JSON.stringify(AnswerRollJudge)%>'),O,'pz');

        A.SetLinkForm(null,B);

        B.SetLinkForm(A,C);

        C.SetLinkForm(B);

        new StartTheExam(A);

        angular.element(document).ready(
            function (){
                angular.bootstrap(document, ["DanXuanTiApp","DuoXuanTiApp","PanDuanTiApp","StartTheExamApp","ExamIndexListApp"]);
            }
        );

    </script>
</main>